// All source files and native code may not be transmitted, reproduced, distributed, 
// or commercially exploited in any way without the express written consent of Sybex Inc.

//MOST THINGS THAT CHANGE

//CHAPTER TITLE
var TestChapter:String = "Chapter 11";

var user_Correct:Array = new Array("D","B","B","A","C","B","A","B","A","C","A","A","D","A","C","A","B","D","A","C");

total = user_Correct.length;
_root.countdown = false;
// set to false to make the timer count up //
_root.hour = 0;
// number of hours at start//
_root.minute = 0;
// number of minutes at start//
//DON'T FORGET THE QUESTIONS AT THE END
//END OF MOST THINGS THAT CHANGE
//
//
//The following is used in the timer mc for adjusting the clock.
_root.delay = false;
_root.wait = 60;
//wait in seconds
_root.lastTime = Math.floor(getTimer()/1000);
i = 1;
totalCorrect = 0;
totalWrong = 0;
QCounter.QTotal.text = total;
Test_Title.text = TestChapter;
var finalCorrect:Number;
var userResponse:Array = new Array(total);
var markResponse:Array = new Array(total);
user_responseA = "";
user_responseB = "";
user_responseC = "";
user_responseD = "";
user_responseE = "";
user_responseF = "";
user_responseG = "";
user_responseH = "";
user_responseI = "";
user_responseJ = "";
user_responseK = "";
user_responseL = "";
user_responseM = "";
user_responseN = "";
_root.review = false;

function initialize() {
	_root.review = false;
	for (j=0; j<total; j++) {
		userResponse[j] = "";
		markResponse[j] = "";
	}
	
}

function showMatch() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;
}

// display multiple choice user_response answer function
function display() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;

	//**NEW
	response.text = userResponse[i-1];
	
}

//radio button function
function answer(choice) {
	set("user_response"+i, choice);
	userResponse[i-1] = choice;
	
	//**NEW
	response.text = userResponse[i-1];	
}

// marker button fuction
function mark(choice) {
	_root["mark"+i] = choice;
	markResponse[i-1] = choice;
}

// display fill in the blank by user.
function submit(userInput) {
	_root["user_response"+i] = userInput;
}

function reset() {
	_root["user_response"+i] = "";
}

function UnloadReview() {
	//ReviewLinks.unloadMovie();
}


function LayoutQuestion() {

	qname = "q"+(_root._currentframe-1);
	
	markname = "m"+(_root._currentframe-1);
	
	_root.loadQuestion(_root._currentframe-1);	
	
	_root.createEmptyMovieClip("container", 1);

	_root.attachMovie("Marker_mc", markname, 2, {_x:65.4, _y:55.4});
	
	if (_root.question_type == "2R") { this.attachMovie("2R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3R") { this.attachMovie("3R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3MC") { this.attachMovie("3MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4R") { this.attachMovie("4R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4MC") { this.attachMovie("4MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5R") { this.attachMovie("5R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5MC") { this.attachMovie("5MC", qname, 1, {_x:24, _y:165}); }	
	if (_root.question_type == "6R") { this.attachMovie("6R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "6MC") { this.attachMovie("6MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7R") { this.attachMovie("7R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7MC") { this.attachMovie("7MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8R") { this.attachMovie("8R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8MC") { this.attachMovie("8MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9R") { this.attachMovie("9R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9MC") { this.attachMovie("9MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10R") { this.attachMovie("10R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10MC") { this.attachMovie("10MC", qname, 1, {_x:24, _y:165}); }


	if (_root.review == false) { _root.attachMovie("show_answer", "show_answer1", 3, {_x:72, _y:418}); }
	if (_root.review == true)  { _root.attachMovie("show_review", "show_review1", 3, {_x:72, _y:418}); }
        if (_root.figure_flag == "True") { _root.attachMovie("show_figure", "show_figure1", 6, {_x:72, _y:418}); }
        if (_root.figure_flag == "False") { _root.createEmptyMovieClip("container", 6); }        

	question_scroll._visible = (question_text.maxscroll > 1);
	question_scroll.setSize(85,16); 
	
	//**NEW
	response.text = userResponse[i-1];
}

function loadQuestion(inNum:Number) {
	var cur:Number = inNum;
	//This corrects for the first frame holding all functions
	//QUESTIONS AND ANSWERS CAN ACCEPT HTML FORMATTING!!!
	//EACH QUESTION SHOULD BE FORMATTED SIMILAR TO THE FOLLOWING.

	switch (cur) {
case 1 :
_root.question = "In wireless networking, multipath is the result of what RF behavior?";
_root.answerA = "Refraction";
_root.answerB = "Diffraction";
_root.answerC = "Absorption";
_root.answerD = "Reflection";
_root.correct = "D";
_root.explanation = "Multipath is caused by reflected signals arriving at the receiver at slightly different times. Refraction is an RF behavior caused by passing through an object of different density, resulting in a change of the signal strength. Absorption is the result of a signal not reflecting or bending or passing around an obstacle.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 2 :
_root.question = "A wireless client device is showing a low receive signal strength value. What option could improve this situation?";
_root.answerA = "Upgrade the client device";
_root.answerB = "Add another access point";
_root.answerC = "Upgrade firmware on devices";
_root.answerD = "Eliminate multipath";
_root.correct = "B";
_root.explanation = "A wireless client device showing a low received signal strength value could be too far away from an access point. Of the answers listed, an additional access point would be the best solution. Upgrading the client device or the firmware would not help the situation. Multipath is caused by reflections and cannot be eliminated.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 3 :
_root.question = "You recently installed an 802.11g wireless network in a small office. One of the employees has been complaining of poor performance and mentioned her notebook computer runs very slowly because of the access point it connects to. What could cause this notebook computer to be performing poorly?";
_root.answerA = "The new 5 GHz phone in her office is interfering with the wireless LAN.";
_root.answerB = "The access point is located at the opposite side of the building from the user's office.";
_root.answerC = "A MAC filter is enabled on the notebook computer.";
_root.answerD = "The firmware was recently upgraded on the access point.";
_root.correct = "B";
_root.explanation = "A user experiencing a slow connection could be too far away from an access point to get a strong enough signal to move data at the highest rate. A 5 GHz phone is operating at a different frequency and would not cause interference with an 802.11g wireless LAN. A MAC filter is set on an access point and will either allow or disallow a client connection. If a firmware upgrade was causing a problem for an access point, it would affect all users.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 4 :
_root.question = "The RF signal strength seen by a wireless client device from an 802.11g access point can be improved by __________________.";
_root.answerA = "Increasing the output power on the access point";
_root.answerB = "Enabling load balancing";
_root.answerC = "Upgrading the ISP service";
_root.answerD = "Enabling WPA 2.0 on both the access point and the client";
_root.correct = "A";
_root.explanation = "Increasing the output power of the access point will result in a higher received signal at the wireless client device. Enabling load balancing will not improve signal strength but will limit the number of devices that associate an access point and may improve throughput. Upgrading the ISP service to faster data rates will not improve signal strength for the wireless client. Enabling security such as WPA 2.0 will not increase the signal strength seen by the client but is recommended to secure the transmission.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 5 :
_root.question = "You are a help desk technician providing support for a wireless network. A user calls and complains he cannot access the Internet. The user tells you he has good signal strength, but the network connection states \"acquiring network address\" and the IP address is all zeros. What could cause this problem?";
_root.answerA = "The client device has a static IP address.";
_root.answerB = "The client has an 802.11a network adapter.";
_root.answerC = "There is an incorrect WPA passphrase on the client device.";
_root.answerD = "A computer virus has infected the client device.";
_root.correct = "C";
_root.explanation = "Incorrect security parameters such as a WPA passphrase will prevent a wireless client device from completing a Layer 2 connection and obtaining an IP address from a DHCP service. If the client device is different technology like 802.11a the device would not have been able to connect. If a static IP address is used, it will not display all zeros. Although a computer virus can create problems for the client device, it would not prevent the device from obtaining an IP address after connecting to the wireless network.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 6 :
_root.question = "You provide consulting services for various companies and receive a call from one of your clients that their notebook computers suddenly started experiencing slow data transfers from the wireless LAN. This company is located in a multi-tenant building. What could cause a sudden change in performance for the notebook computers?";
_root.answerA = "A firmware upgrade was recently performed on the access point.";
_root.answerB = "The access point for a new tenant in the building is set to the same RF channel.";
_root.answerC = "The access point shows a low received signal strength.";
_root.answerD = "Someone activated the diversity antennas on the access point.";
_root.correct = "B";
_root.explanation = "A sudden change in performance might occur if an access point for a new tenant is set to the same RF channel as your clients access point. This could cause interference, which would degrade performance. A firmware upgrade on the access point usually fixes problems or provides enhancements. Received signal strength is typically an issue based on distance from an access point. Diversity antennas would help minimize the problems associated with multipath and in most cases would improve performance rather than degrade it.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 7 :
_root.question = "What can solve a hidden node problem caused by an obstacle or obstruction on an 802.11g wireless network?";
_root.answerA = "Adding another access point";
_root.answerB = "Setting the access point to mixed mode";
_root.answerC = "Increasing the distance between the access point and the clients";
_root.answerD = "Adjusting the received signal strength on the client";
_root.correct = "A";
_root.explanation = "A hidden node problem caused by obstacles or obstructions could be resolved by adding another access point so wireless client devices would not be subject to clear channel assessment issues. Setting an access point to mixed mode will allow both 802.11b and 802.11g clients to connect to the network. Increasing the distance between the access point and the clients will not improve the situation but will actually make it worse. Adjusting the received signal strength on the client would improve performance for that client but would not necessarily solve the hidden node problem.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 8 :
_root.question = "Weak signal strength would have an impact on what device?";
_root.answerA = "Infrastructure device";
_root.answerB = "Client device";
_root.answerC = "Multipath device";
_root.answerD = "Transmitter device";
_root.correct = "B";
_root.explanation = "The wireless LAN client device would be mostly affected by weak signal strength. An infrastructure device such as an access point generates the signal received by the client. Multipath is a phenomenon that is a result of several wavefronts of the same signal reaching a receiver at different times. A transmitter device is responsible for sending an RF signal.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 9 :
_root.question = "An incorrect passphrase set on a client device will result in a different preshared key that is generated for a device using WPA 2.0 as a security solution. What will be the result of a mismatched passphrase between the client device and an access point?";
_root.answerA = "Association is established and terminated and no valid IP address";
_root.answerB = "Invalid association and valid IP address";
_root.answerC = "A deauthentication";
_root.answerD = "A disassociation";
_root.correct = "A";
_root.explanation = "A passphrase or preshared key will be validated after an 802.11 authentication and association. In order for the client device to get a valid IP address, a successful authentication, association, and passphrase would have to occur. A deauthentication will end the authentication state, and a disassociation will no longer allow a device to pass traffic across the access point.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 10 :
_root.question = " The throughput of a wireless LAN can be affected by _______________ or _______________.";
_root.answerA = "Distance from access point, IP address";
_root.answerB = "Distance from access point, MAC address";
_root.answerC = "Distance from access point, output power of access point";
_root.answerD = "Distance from access point, output power of client device";
_root.correct = "C";
_root.explanation = "Two factors that may have an impact on throughput in a wireless LAN are distance from the access point or the output power level of an access point. The IP address or MAC address identify the device on the network and would not affect throughput. The output power of the client device has more to do with its transmitting capabilities than the receivers capabilities.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 11 :
_root.question = "The device driver of a wireless network adapter card is ___________.";
_root.answerA = "Required";
_root.answerB = "Optional";
_root.answerC = "Used with security";
_root.answerD = "Another name for SSID";
_root.correct = "A";
_root.explanation = "The device driver is a required component that allows the wireless network adapter card to interface with the operating system. A device driver does not provide security nor does it identify the network.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 12 :
_root.question = "What is a valid solution to a hidden node  problem caused by different technology types?";
_root.answerA = "Mixed mode technology";
_root.answerB = "Additional access point";
_root.answerC = "Increasing output power";
_root.answerD = "Removing an obstacle";
_root.correct = "A";
_root.explanation = "Hidden node caused by different technology types is the result of the access point not being able to differentiate between spread spectrum technologies. An access point set to mixed mode will understand both HR/DSSS and ERP-OFDM, which will solve the problem. Adding another access point or increasing output power would not solve the problem although that would be a solution for other hidden node scenarios. Removing an obstacle is a valid solution for a different hidden node problem.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 13 :
_root.question = "You are a network administrator and receive a call from a user stating he cannot access the wireless LAN. The office contains 50 other users and nobody else is complaining about the network. What could be a potential problem that would keep this user from connecting to the access point?";
_root.answerA = "The connection to the Internet has been terminated.";
_root.answerB = "The access point needs to be upgraded.";
_root.answerC = "Incorrect firmware was installed on the access point.";
_root.answerD = "The wireless client device has a corrupt device driver.";
_root.correct = "D";
_root.explanation = "A corrupt device driver may cause the network adapter card in a wireless client device to operate incorrectly or to malfunction. A terminated Internet connection would be a global problem and would affect all users. An upgrade or incorrect firmware would not cause the problem only for a single user.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 14 :
_root.question = "Lack of RF connectivity on a wireless client could be caused by which layer of the OSI model?";
_root.answerA = "Layer 1";
_root.answerB = "Layer 3";
_root.answerC = "Layer 4";
_root.answerD = "Layer 7";
_root.correct = "A";
_root.explanation = "Layer 1 provides the physical connectivity between devices, which use the air as the medium to carry the radio frequency. Layers 3 and 4 are responsible for TCP/IP. Layer 7 is the interface to the user, also known as the Application layer.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 15 :
_root.question = "What address would be considered a Microsoft Windows Automatic Private IP Address, assigned when no DHCP server is available on the LAN?";
_root.answerA = "192.168.0.1";
_root.answerB = "172.168.0.1";
_root.answerC = "169.254.0.1";
_root.answerD = "10.1.0.1";
_root.correct = "C";
_root.explanation = "Microsoft Windows 98 and later are designed to use the Automatic Private IP Address service. This service will provide an IP address to client devices in the range of <font face=\"Courier New\">169.254.X.X</font>. This will allow local connectivity for any devices that are connected to a common LAN.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 16 :
_root.question = "Weak or no signal at a wireless client device can be the result of ____________________.";
_root.answerA = "Distance from an access point";
_root.answerB = "Distance from other client devices";
_root.answerC = "Distance from the wiring closet";
_root.answerD = "Distance from Ethernet switch";
_root.correct = "A";
_root.explanation = "The distance from an access point could affect the received signal strength for a wireless client device. The distance from other clients has no impact on devices that are connected to an access point. The distance from an Ethernet switch or from the wiring closet has no impact on a wireless client.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 17 :
_root.question = "What does the signal-to-noise ratio represent?";
_root.answerA = "The difference between output power and noise floor";
_root.answerB = "The difference between received signal and noise floor";
_root.answerC = "The difference between access point output power and received client power";
_root.answerD = "The difference between client output power and noise generated by the access point";
_root.correct = "B";
_root.explanation = "The signal-to-noise ratio represents the difference between the received signal strength and the level of the noise floor. A good signal-to-noise ratio will give a client the ability to distinguish between signal and noise and allow it to recover data that was transmitted.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 18 :
_root.question = "What can 802.11n use to provide higher throughput to wireless client devices that 802.11g cannot?";
_root.answerA = "Hidden node";
_root.answerB = "Received signal strength";
_root.answerC = "DHCP";
_root.answerD = "Multipath";
_root.correct = "D";
_root.explanation = "802.11n takes advantage of multipath, which is typically a problem for other wireless LAN technologies. By using multipath, 802.11n devices will have better throughput than 802.11g devices. Received signal strength means the same thing across technologies. DHCP is a service that provides IP addresses automatically. Hidden node is a problem that may degrade throughput for connected devices.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 19 :
_root.question = "The throughput of a wireless LAN client device can be increased by performing which task?";
_root.answerA = "Adding access points";
_root.answerB = "Upgrade the client software to full-duplex mode";
_root.answerC = "Increasing the RF noise";
_root.answerD = "Hiding the SSID";
_root.correct = "A";
_root.explanation = "Adding additional access points could help increase the throughput for a wireless LAN client device. This is possible because additional access points would allow for load-balancing features and therefore provide less contention at that access point. Upgrading the client software utility or device driver will not increase throughput for the wireless device. Hiding the SSID has no impact on throughput.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 20 :
_root.question = "The received signal strength of a wireless client utility could be increased by ______________________.";
_root.answerA = "Upgrading the wireless client device";
_root.answerB = "Enabling load-balancing features on the access point";
_root.answerC = "Increasing the gain of the antenna on the access point";
_root.answerD = "Installing the Microsoft Wireless Zero Configuration utility";
_root.correct = "C";
_root.explanation = "Increasing the gain of an antenna will provide a larger RF coverage cell, thereby providing more received signal at the same distance for a wireless client device. Upgrading the wireless client will not improve the received signal strength. Load balancing will help with throughput, and Microsoft WZC is a example of a built-in client utility.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

	}
		
	QCounter.QCurrent.text = cur;
}

initialize();


//Change the following question numbers to the indicated question type!
//1. 4R
//2. 4R
//3. 4R
//4. 4R
//5. 4R
//6. 4R
//7. 4R
//8. 4R
//9. 4R
//10. 4R
//11. 4R
//12. 4R
//13. 4R
//14. 4R
//15. 4R
//16. 4R
//17. 4R
//18. 4R
//19. 4R
//20. 4R





//